package net.xiangcaowuyu.shiro.mapper;

import net.xiangcaowuyu.shiro.entity.ShiroRole;
import org.apache.ibatis.annotations.Mapper;

import java.util.Set;

/**
 * @author laughing
 * @date 2020/10/11
 * @site https://www.lisen.org
 */
@Mapper
public interface ShiroRoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ShiroRole record);

    int insertSelective(ShiroRole record);

    ShiroRole selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ShiroRole record);

    int updateByPrimaryKey(ShiroRole record);

    /**
     * 根据用户编号获取其角色列表
     * @param userCode 用户编号
     * @return 权限列表
     */
    Set<ShiroRole> findByUserCode(String userCode);
}